package com.lagou.task08;
//通话套餐类


public class PhonePackage extends PhoneCard implements CallService {
    private int time; //通话时长
    private int messageNumber;//短信条数
    private int monthlyRate;//每月资费

    public PhonePackage() {
    }

    public PhonePackage(int time, int messageNumber, int monthlyRate) {
        setTime(time);
        setMessageNumber(messageNumber);
        setMonthlyRate(monthlyRate);
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getMessageNumber() {
        return messageNumber;
    }

    public void setMessageNumber(int messageNumber) {
        this.messageNumber = messageNumber;
    }

    public int getMonthlyRate() {
        return monthlyRate;
    }

    public void setMonthlyRate(int monthlyRate) {
        this.monthlyRate = monthlyRate;
    }

    public void show(){
        System.out.println("显示通话类套餐信息" );
    }

    //重写CallService接口
    @Override
    public void showCall(int time, PhoneCard pc) {
        System.out.println("通话服务类接口的实现~");
    }
}
